/*
 * MonosComponentBase.java
 *
 * Created on April 15, 2005, 2:18 PM
 */

package com.milowski.monos.component;

import java.net.URI;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.infoset.component.ComponentDefinitionBase;
import org.infoset.xml.InfosetFactory;
import org.infoset.xml.Name;


/**
 *
 * @author R. Alexander Milowski
 */
public abstract class MonosComponentBase extends ComponentDefinitionBase
{
   static final String version = "1.1";
   static final String vendor = "Alex Milowski";
   static final URI vendorLocation = URI.create("http://www.milowski.com/");
   static Name outputPortName = InfosetFactory.createName("output");
   static Name inputPortName = InfosetFactory.createName("input");
   static Set<Name> inputPorts = null;
   static Set<Name> outputPorts = null;
   static {
      Set<Name> _inputPorts = new HashSet<Name>();
      _inputPorts.add(inputPortName);
      inputPorts = Collections.unmodifiableSet(_inputPorts);
      Set<Name> _outputPorts = new HashSet<Name>();
      _outputPorts.add(outputPortName);
      outputPorts = Collections.unmodifiableSet(_outputPorts);
   }
   
   /** Creates a new instance of MonosComponentBase */
   protected MonosComponentBase(Name name)
   {
      super(name,vendor,version,vendorLocation);
   }
   
   public Collection<Name> getInputs() {
      return inputPorts;
   }
   
   public Collection<Name> getOutputs() {
      return outputPorts;
   }
}
